<html>
<head>
<script language="JavaScript" type="text/javascript">
	function checkform ( form )
	{
		if (form.item_name.value == "") {
			alert( "Please enter the name of the item." );
			form.item_name.focus();
			return false ;
		}
		if (form.quantity.value == "") {
			alert( "Please enter the number of items." );
			form.quantity.focus();
			return false ;
		}
		if (isNaN(form.quantity.value)) {
			alert( "Please enter a positive number." );
			form.quantity.focus();
			return false ;
		}
		if (form.quantity.value <= 0) {
			alert( "Please enter a positive number." );
			form.quantity.focus();
			return false ;
		}
		if (form.source.value == "") {
			alert( "Please enter a source." );
			form.source.focus();
			return false ;
		}
		return true ;
	}
</script>
</head>
<body>
	<form action="new_item_info.php" target="output_panel" method="post" onsubmit="return checkform(this);">
	<fieldset>
		<legend>Add New Item</legend>
		<table>
			<tr>
				<td>Item Name: </td>
				<td><input type="text" size=20 name='item_name'/></td>
			</tr>
			<tr>
				<td>Quantity: </td>
				<td><input type="text" size=20 name='quantity'/></td>
			</tr>
			<tr>
				<td>Category: </td>
				<td><select name="category">
						<option value="Food Items">Food Items</option>
						<option value="Medicine Supplies">Medicine Supplies</option>
						<option value="Uniforms">Uniforms</option>
						<option value="Cleaning Materials">Cleaning Materials</option>
						<option value="Electrical Supplies">Electrical Supplies</option>
						<option value="Paper">Paper</option>
						<option value="Other Office Supplies">Other Office Supplies</option>
					</select>
				</td>
			</tr>
			<tr>
				<td>Source: </td>
				<td><select name="source">
						<option value="S&R">S&R</option>
						<option value="Shopwise">Shopwise</option>
						<option value="Divisoria">Divisoria</option>
						<option value="National Bookstore">National Bookstore</option>
						<option value="PINGBON">PINGBON</option>
						<option value="Other Connections">Other Connections</option>
					</select>
				</td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" value="ADD ITEM" /></td>
			</tr>
	</fieldset>
	</form>
</body>
</html>